import http from "./index";

//获取用户信息
export function userInfo() {
    return http.request({
        url: "/user/info",
        method: "get"
    })
}

//修改昵称
export function editName(data: any) {
    return http.request({
        url: "/user/modify-nickname",
        method: "PATCH",
        params: data
    })
}

//忘记密码
export function forgetPassword(data: any) {
    return http.request({
        url: "/password/forget",
        method: "PATCH",
        params: data
    })
}

//忘记密码发送短信
export function forgetPasswordSMS(data: any) {
    return http.request({
        url: "/sms/forget-password",
        method: "post",
        params: data
    })
}

//修改密码
export function modifyPassword(data: any) {
    return http.request({
        url: "/password/modify",
        method: "PATCH",
        params: data
    })
}

//修改密码发送短信
export function modifyPasswordSMS(data: any) {
    return http.request({
        url: "/sms/modify-password",
        method: "post",
        params: data
    })
}


//用户绘画记录
export function drawRecord(data: any) {
    return http.request({
        url: "/user-draw-record",
        method: "get",
        params: data
    })
}

//绘画记录详情
export function drawRecordDetail(data: any) {
    return http.request({
        url: "/user-draw-record/detail",
        method: "get",
        params: data
    })
}

//绘画记录删除
export function drawRecordDel(data: any) {
    return http.request({
        url: "/user-draw-record/delete",
        method: "DELETE",
        params: data
    })
}

//支付列表跟套餐列表
export function payList() {
    return http.request({
        url: "/pay",
        method: "get"
    })
}

//支付列表跟套餐列表
export function payAlipay(data: any) {
    return http.request({
        url: "/pay/alipay",
        method: "post",
        params: data
    })
}

//支付状态查询
export function payQuery(data: any) {
    return http.request({
        url: "/pay/check-pay",
        method: "get",
        params: data
    })
}

//用户充值记录
export function userPayRecord(data: any) {
    return http.request({
        url: "/user-pay-record",
        method: "get",
        params: data
    })
}
